<?php
$pid = $_POST['pid'];

include ("conn.php");
//下面是读取数据
$sql = "SELECT * FROM comment WHERE pid=".$pid;
$result = $conn->query($sql);
$arr = array();
include ("findUser.php"); 
if ($result->num_rows > 0) {
    // 输出数据
    while($row = $result->fetch_assoc()) {
    	$nowUser = findUser($row['uid']);
    	array_push($arr,array($row['uid'],$nowUser[1],$nowUser[2],$row['content'],$row['likeNum'],$row['pcoid'],$row['date']));
    }
}
echo json_encode($arr);

?>